package wqh.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import wqh.dao.DtDeviceDao;
import wqh.domain.DtDevice;
import wqh.service.DtDeviceService;

import java.util.List;

/**
 * Created by devts on 2016/11/30.
 */
@Service("dtDeviceService")
public class DtDeviceServiceImpl implements DtDeviceService{

    @Autowired
    private DtDeviceDao dtDeviceDao;

    public List<DtDevice> findAll() {
        return dtDeviceDao.findAll();
    }

    public DtDevice findAllById(Integer id) {
        return dtDeviceDao.findAllById(id);
    }

    public DtDevice findAllByIP(String ip){
        return this.dtDeviceDao.findAllByIP(ip);
    }

    public int insert(DtDevice dtDevice) {
        return dtDeviceDao.insert(dtDevice);
    }

    public int updateById(DtDevice dtDevice) {
        return dtDeviceDao.updateById(dtDevice);
    }

    public int deleteById(Integer id) {
        return dtDeviceDao.deleteById(id);
    }
}
